]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: Immediately show the flash spot
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 14 Jan 2013 22:51:36 +0000 (17:51 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 16 Jan 2013 22:19:16 +0000 (17:19 -0500)
The "flash" effect looks awkward when it fades in and out. Real
camera have an immediate flash of light, which then seems to fade
out as our eyes readjust the rapid change in lighting.

https://bugzilla.gnome.org/show_bug.cgi?id=691875

js/ui/screenshot.js

index 12cf186423441b347777df6e2713268b49df79ab..5537bf1551210af27e026b40a0e1a3ff5615946b 100644 (file)
@@ -242,7 +242,7 @@ const SelectArea = new Lang.Class({
 });
 Signals.addSignalMethods(SelectArea.prototype);
 
-const FLASHSPOT_ANIMATION_TIME = 0.25; // seconds
+const FLASHSPOT_ANIMATION_OUT_TIME = 0.5; // seconds
 
 const Flashspot = new Lang.Class({
     Name: 'Flashspot',
@@ -258,21 +258,12 @@ const Flashspot = new Lang.Class({
     },
 
     fire: function() {
-        this.actor.opacity = 0;
-        Tweener.addTween(this.actor,
-                         { opacity: 255,
-                           time: FLASHSPOT_ANIMATION_TIME,
-                           transition: 'linear',
-                           onComplete: Lang.bind(this, this._onFireShowComplete)
-                         });
         this.actor.show();
-    },
-
-    _onFireShowComplete: function() {
+        this.actor.opacity = 255;
         Tweener.addTween(this.actor,
                          { opacity: 0,
-                           time: FLASHSPOT_ANIMATION_TIME,
-                           transition: 'linear',
+                           time: FLASHSPOT_ANIMATION_OUT_TIME,
+                           transition: 'easeOutQuad',
                            onComplete: Lang.bind(this, function() {
                                this.destroy();
                            })